<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta http-equiv="Cache-Control" content="no-siteapp">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=1, minimum-scale=1, maximum-scale=1">
<meta name="renderer" content="webkit">
<meta name="google" value="notranslate">
<meta name="robots" content="index,follow">


<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Akkuman">
<meta name="twitter:description" content="Akkuman的技术博客">
<meta name="twitter:image:src" content="http://127.0.0.1:8000/images/avatar.png">

<meta property="og:url" content="http://127.0.0.1:8000">
<meta property="og:title" content="Akkuman">
<meta property="og:description" content="Akkuman的技术博客">
<meta property="og:site_name" content="Akkuman">
<meta property="og:image" content="http://127.0.0.1:8000/images/avatar.png">
<meta property="og:type" content="website">
<meta name="robots" content="noodp">

<meta itemprop="name" content="Akkuman">
<meta itemprop="description" content="Akkuman的技术博客">
<meta itemprop="image" content="http://127.0.0.1:8000/images/avatar.png">

<link rel="canonical" href="http://127.0.0.1:8000">

<link rel="shortcut icon" href="/favicon.png">
<link rel="apple-itouch-icon" href="/favicon.png">

<link type="text/css" rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/4.0.0/css/bootstrap.min.css">
<link type="text/css" rel="stylesheet" href="/bundle/css/prism.css">
<link type="text/css" rel="stylesheet" href="/bundle/css/zoom.css">
<link type="text/css" rel="stylesheet" href="/bundle/css/main.css">
<script src="https://cdn.bootcss.com/jquery/2.2.4/jquery.min.js"></script>



<script>var cPlayers = [];var cPlayerOptions = [];</script>


<script type="text/javascript">
    var timeSinceLang = {
        year: '年前',
        month: '个月前',
        day: '天前',
        hour: '小时前',
        minute: '分钟前',
        second: '秒前'
    };
    var root = '';
</script>


        <meta name="keywords" content="life,Hacker,生活,">
        <meta name="description" content="给斐讯K1刷机并拨号e信(湖北地区测试无问题)">
        <meta name="author" content="Akkuman">
        <title>给斐讯K1刷机并拨号e信(湖北地区测试无问题)</title>
    </head>
    <body>
        
        <header id="header" class="clearfix">
  <div class="container-fluid">
      <div class="row">
          <div class="logo">
              <div class="header-logo">
                <script>
                  var getwbclass = function() {
                    var wbclass = ['b', 'w'];
                    return wbclass[Math.floor(Math.random()*wbclass.length)];
                  }
                  var sitetitle = "Akkuman";
                  for (i in sitetitle) {
                    document.write('<a href="/"><span class="' + getwbclass() + ' titlechar">' + sitetitle.charAt(i) + '</span></a>');
                  }          
                  
                </script>
                
                <a id="btn-menu" href="javascript:isMenu();">
                    <span class="b">·</span>
                </a>
                <a href="javascript:isMenu1();">
                    <span id="menu-1" class="bf">1</span>
                </a>
                <a href="javascript:isMenu2();">
                    <span id="menu-2" class="bf">2</span>
                </a>
                <a href="javascript:isMenu3();">
                    <span id="menu-3" class="bf">3</span>
                </a>
              </div>
              <div id="menu-page">
                <a href="/archive.html"><li>归档</li></a>
                <a href="/tag.html"><li>标签</li></a>
                
                <a href="/atom.xml"><li>订阅</li></a>
                
                <a href="about.html"><li>关于</li></a>
              </div>
              <div id="search-box">
                  <div id="search">
                      <input autocomplete="off" type="text" name="s" id="menu-search" placeholder="搜索..." data-root="" />
                  </div>
              </div>
          </div>
      </div>
  </div>
  </header>
        <div id="body" class="clearfix">
            <div class="container-fluid">
                <div class="row">
                    <div id="main" class="col-12 clearfix" role="main">
                        <article class="posti" itemscope itemtype="http://schema.org/BlogPosting">
                            <h1 class="post-title" itemprop="name headline">给斐讯K1刷机并拨号e信(湖北地区测试无问题)</h1>
                            <div class="post-meta">
                                <p>
                                    Written by <a itemprop="name" href="/about.me.html" rel="author">Akkuman</a> with ♥ on <time datetime="1474522701" itemprop="datePublished"></time> in <a href="/tag/life/index.html">life </a><a href="/tag/Hacker/index.html">Hacker </a><a href="/tag/%e7%94%9f%e6%b4%bb/index.html">生活 </a>
                                </p>
                            </div>
                            <div class="post-content" itemprop="articleBody">
                                <h1>◆购买斐讯k1路由器</h1>

<p>路由器在天猫京东斐讯旗舰店都有售卖，我买的价格是159，不过有一张铃铛卡，一个月之后返还160元，相当于0元购</p>

<h1>◆路由器刷不死Breed</h1>

<h2>1.路由与电脑有线连接好，输入192.168.2.1，完成设置</h2>

<p><img src="" data-src="http://7xusrl.com1.z0.glb.clouddn.com/k1basicSetting.png" alt="k1basicSetting" /></p>

<h2>2.在浏览器地址栏输入：<a href="http://192.168.2.1/goform/Diagnosis?pingAddr=192.168.2.100|echo&quot;&quot;|telnetd">http://192.168.2.1/goform/Diagnosis?pingAddr=192.168.2.100|echo&quot;&quot;|telnetd</a></h2>

<p>(如果你的电脑ip不是192.168.2.100,请改成你电脑的ip(内网ip))</p>

<h2>3.打开tftp，这里用tftp32演示，按图设置</h2>

<p><img src="" data-src="http://7xusrl.com1.z0.glb.clouddn.com/tftpK1Setting.png" alt="tftpK1Setting" /></p>

<h2>4.打开CMD,务必使用管理员权限，telnet 192.168.2.1</h2>

<p><img src="" data-src="http://7xusrl.com1.z0.glb.clouddn.com/cmdK1Serting.png" alt="cmdK1Serting" /></p>

<h2>5.输入用户名密码</h2>

<p><img src="" data-src="http://7xusrl.com1.z0.glb.clouddn.com/cmd2K1Serting.png" alt="cmd2K1Serting" /></p>

<h2>6.输入命令</h2>

<pre><code class="language-cmd"> 1) cd /tmp

 2) tftp –g –l /tmp/breed.bin –r breed.bin 192.168.2.100

 3) cat /dev/mtd1 &gt;/tmp/mtd1.bin
   cat /dev/mtd0 &gt;/tmp/mtd0.bin

 4) tftp –p –r mtd1.bin –l /tmp/mtd1.bin 192.168.2.100
   tftp –p –r mtd1.bin –l /tmp/mtd1.bin 192.168.2.100

 5) mtd_write write breed.bin Bootloader
</code></pre>

<p>等待出现#字
<img src="" data-src="http://7xusrl.com1.z0.glb.clouddn.com/cmd3K1Serting.png" alt="cmd3K1Serting" /></p>

<h2>7.拔掉电源，然后按住reset键插上电源，地址栏输入192.168.1.1，就进入了breed界面</h2>

<p><img src="" data-src="http://7xusrl.com1.z0.glb.clouddn.com/K1breed.png" alt="K1breed" /></p>

<h3>懒人一键式安装法：</h3>

<p>输入：
wget <a href="http://breed.hackpascal.net/breed-mt7620-reset1.bin">http://breed.hackpascal.net/breed-mt7620-reset1.bin</a>
然后输入：
mtd_write write breed-mt7620-reset1.bin Bootloader</p>

<p>等待出现#字（代表着已经完成）</p>

<h2>刷breed后语</h2>

<p>只要路由breed不被变动，路由刷错固件也不怕，同样方式进入breed刷回正确的即可。</p>

<p>推荐每次刷完固件后，去固件系统管理&ndash;恢复原厂默认值。</p>

<h1>◆刷openWRT</h1>

<h2>1.刷新固件</h2>

<p>我在下面的文件中打包了两个固件，一个是潘多拉的K1专版，一个是openWRT，我自己使用的是专版潘多拉，各位看官自己选择，刷新固件很简单，看图
<img src="" data-src="http://7xusrl.com1.z0.glb.clouddn.com/K1breedset1.png" alt="set1" />
<img src="" data-src="http://7xusrl.com1.z0.glb.clouddn.com/K1breedset2.png" alt="set2" /></p>

<p>点击更新，看路由灯全部亮起后，无线网络出现,OK</p>

<h1>◆安装e信(NetKeeper)插件并进行拨号</h1>

<h2>1.你得准备一些东西(WINSCP一个，op系统相关netkeeper一只）找到对应地区更改文件名为<code>sxplugin.so</code></h2>

<h2>2.通过WINSCP登录你的路由器</h2>

<p>** 注意使用scp协议，密码admin（第一次登录op需要重设密码依然设为admin就可以了 **</p>

<p><img src="" data-src="http://7xusrl.com1.z0.glb.clouddn.com/winscpK1set.png" alt="winscpK1set" /></p>

<h2>3.放入拨号插件</h2>

<p>登录之后打开路由器，在这儿选择/(root）然后选择/usr/lib/pppd/2.4.7文件夹将你编辑好的<code>sxplugin.so</code>文件放入即可（** 这里的sxplugin.so是自己更名的，湖北的就选择wuhan的来更名，文件在文末有打包 ** ）</p>

<h2>4.设置帐号密码拨号</h2>

<p>通过浏览器登录浏览器打开网络下的接口选择WAN口点击修改，协议选择PPPOE即可，然后下面有个按钮点一下会出来填帐号密码的，账户和密码也要写对，我是重庆动态密码可以正常用。（蓝字我是加了中文包的，你刷了过后是英文呢，凑合看吧，加中文包需要路由器联网。）</p>

<p><img src="" data-src="http://7xusrl.com1.z0.glb.clouddn.com/openWRTK1.png" alt="op" />
<img src="" data-src="http://7xusrl.com1.z0.glb.clouddn.com/openWRTK1wan.png" alt="op2" /></p>

<p>最后点击保存应用退出</p>

<h2>5.最后的配置</h2>

<p>通过WINSCP登录路由器同样打开文件夹/etc/config/找到network修改
<img src="" data-src="http://7xusrl.com1.z0.glb.clouddn.com/K1network.png" alt="K1network" /></p>

<p>在图中的位置输入option &lsquo;pppd_options&rsquo; &lsquo;plugin sxplugin.so&rsquo;这个代码即可（注意粘贴后字体是否一致，主要是‘号的问题，可保存后再打开查看，必须搞定字体格式才行），到此netkeeper就安装完了。最后重启路由器，到系统里面选时区，同步浏览器时间，保存。再到wan点击连接就能联网了。（如果进不去wan这个界面就是设置错了）</p>

<p><img src="" data-src="http://7xusrl.com1.z0.glb.clouddn.com/k1lastsetting.png" alt="k1lastsetting" /></p>

<blockquote>
<p>最后要说的，这个可用的原因是湖北地区e信2.5的算法依旧可用，有的地区加了心跳，有的地区强制升级了，并不可用,教程到此处完结，后面的有能力可以看看，工具教程打包在文末</p>
</blockquote>

<h1>◆闪讯算法源码</h1>

<pre><code class="language-c">#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;time.h&gt;
#include &lt;string.h&gt;
#include &lt;pppd/pppd.h&gt;
#include &lt;pppd/md5.h&gt;

typedef unsigned char byte;

char pppd_version[] = VERSION;

static char saveuser[MAXNAMELEN] = {0};
static char savepwd[MAXSECRETLEN] = {0};

static void getPIN(byte *userName, byte *PIN)
{
    int i,j;//循环变量
    long timedivbyfive;//时间除以五
    time_t timenow;//当前时间，从time()获得
    byte RADIUS[16];//凑位字符
    byte timeByte[4];//时间 div 5
    byte beforeMD5[32];//时间 div 5+用户名+凑位
    MD5_CTX md5;//MD5结构体
    byte afterMD5[16];//MD5输出
    byte MD501H[2]; //MD5前两位
    byte MD501[3];
    byte timeHash[4]; //时间div5经过第一次转后后的值
    byte temp[32]; //第一次转换时所用的临时数组
    byte PIN27[6]; //PIN的2到7位，由系统时间转换

    //code
    info(&quot;sxplugin : using zjxinlisx01&quot;);
    strcpy(RADIUS, &quot;zjxinlisx01&quot;);
    timenow = time(NULL);
    timedivbyfive = timenow / 5;

    for(i = 0; i &lt; 4; i++) {
        timeByte[i] = (byte)(timedivbyfive &gt;&gt; (8 * (3 - i)) &amp; 0xFF);
    }
    for(i = 0; i &lt; 4; i++) {
        beforeMD5[i]= timeByte[i];
    }
    for(i = 4; i &lt; 16 &amp;&amp; userName[i-4]!='@' ; i++) {
        beforeMD5[i] = userName[i-4];
    }
    j=0;
    while(RADIUS[j]!='\0')
        beforeMD5[i++] = RADIUS[j++];

    MD5_Init(&amp;md5);
    MD5_Update (&amp;md5, beforeMD5, i);
    printf(&quot;%d %s\n&quot;,i,beforeMD5);
    MD5_Final (afterMD5, &amp;md5);

    MD501H[0] = afterMD5[0] &gt;&gt; 4 &amp; 0xF;
    MD501H[1] = afterMD5[0] &amp; 0xF;

    sprintf(MD501,&quot;%x%x&quot;,MD501H[0],MD501H[1]);

    for(i = 0; i &lt; 32; i++) {
        temp[i] = timeByte[(31 - i) / 8] &amp; 1;
        timeByte[(31 - i) / 8] = timeByte[(31 - i) / 8] &gt;&gt; 1;
    }

    for (i = 0; i &lt; 4; i++) {
        timeHash[i] = temp[i] * 128 + temp[4 + i] * 64 + temp[8 + i]
            * 32 + temp[12 + i] * 16 + temp[16 + i] * 8 + temp[20 + i]
            * 4 + temp[24 + i] * 2 + temp[28 + i];
    }

    temp[1] = (timeHash[0] &amp; 3) &lt;&lt; 4;
    temp[0] = (timeHash[0] &gt;&gt; 2) &amp; 0x3F;
    temp[2] = (timeHash[1] &amp; 0xF) &lt;&lt; 2;
    temp[1] = (timeHash[1] &gt;&gt; 4 &amp; 0xF) + temp[1];
    temp[3] = timeHash[2] &amp; 0x3F;
    temp[2] = ((timeHash[2] &gt;&gt; 6) &amp; 0x3) + temp[2];
    temp[5] = (timeHash[3] &amp; 3) &lt;&lt; 4;
    temp[4] = (timeHash[3] &gt;&gt; 2) &amp; 0x3F;

    for (i = 0; i &lt; 6; i++) {
        PIN27[i] = temp[i] + 0x020;
        if(PIN27[i]&gt;=0x40) {
            PIN27[i]++;
        }
    }

    PIN[0] = '\r';
    PIN[1] = '\n';

    memcpy(PIN+2, PIN27, 6);

    PIN[8] = MD501[0];
    PIN[9] = MD501[1];

    strcpy(PIN+10, userName);
}

static int pap_modifyusername(char *user, char* passwd)
{
    byte PIN[MAXSECRETLEN] = {0};
    getPIN(saveuser, PIN);
    strcpy(user, PIN);
    info(&quot;sxplugin : user  is %s &quot;,user);
}

static int check(){
    return 1;
}

void plugin_init(void)
{
    info(&quot;sxplugin : init&quot;);
    strcpy(saveuser,user);
    strcpy(savepwd,passwd);
    pap_modifyusername(user, saveuser);
    info(&quot;sxplugin : passwd loaded&quot;);
    pap_check_hook=check;
    chap_check_hook=check;
}
</code></pre>

<h1>◆下载地址</h1>

<p><a href="http://cloud.189.cn/t/umuUBrQNNRfi">  (访问码:4854)</a></p>

                            </div>
                            <div style="display:block;" class="clearfix">
                                <section style="float:left;">
                                    <span itemprop="keywords" class="tags">
                                        tag(s): <a href="/tag/life/index.html">life </a><a href="/tag/Hacker/index.html">Hacker </a><a href="/tag/%e7%94%9f%e6%b4%bb/index.html">生活 </a>
                                    </span>
                                </section>
                                <section style="float:right;">
                                    <span><a id="btn-comments" href="javascript:isComments();">show comments</a></span> · <span><a href="javascript:goBack();">back</a></span> · 
                                    <span><a href="/">home</a></span>
                                </section>
                            </div>
                            



<div id="comments" class="gen">
    <script>
        document.write('<section id="disqus_thread"></section>');
        var site_comment_load = function disqus() {
            var d = document, s = d.createElement('script');
            s.src = '//Akkum4n.disqus.com/embed.js';
            s.setAttribute('data-timestamp', +new Date());
            (d.head || d.body).appendChild(s);
        }
    </script>
</div>

                        </article>
                    </div>
                </div>
            </div>
        </div>
        <footer id="footer" role="contentinfo">
    <div class="container-fluid">
        <div class="row">
        <div class="col-12">
            &copy; 
            <script type="text/javascript">
                document.write(new Date().getFullYear());
            </script>
            <a href="/">Akkuman</a>.
            Using <a target="_blank" href="http://www.chole.io/">Ink</a> & <a target="_blank" href="/">Story</a>.
        </div>
        </div>
    </div>
</footer>

<script src="https://cdn.bootcss.com/jquery/2.2.4/jquery.min.js"></script>
<script src="/bundle/js/prism.js"></script>
<script src="/bundle/js/zoom-vanilla.min.js"></script>
<script src="/bundle/js/main.js"></script>

<script>
    window.onload=function(){
        if (window.location.hash!='') {
          var i=window.location.hash.indexOf('#comment');
          var ii=window.location.hash.indexOf('#respond-post');
          if (i != '-1' || ii != '-1') {
            document.getElementById('btn-comments').innerText='hide comments';
            document.getElementById('comments').style.display='block';
          }
        }
    }

    function isMenu(){
        if(document.getElementById('menu-1').style.display=='inline'||document.getElementById('menu-1').style.display=='block'){
            $('#search-box').fadeOut(200);
            $('#menu-page').fadeOut(200);
            $('#menu-1').fadeOut(500);
            $('#menu-2').fadeOut(400);
            $('#menu-3').fadeOut(300);
        } else {
            $('#menu-1').fadeIn(150);
            $('#menu-2').fadeIn(150);
            $('#menu-3').fadeIn(150);
        }
    }

    function isMenu1(){
        if(document.getElementById('menu-page').style.display=='block'){
            $('#menu-page').fadeOut(300);
        } else {
            $('#menu-page').fadeIn(300);
        }
    }

    function isMenu2(){
        if(document.getElementById('torTree')){
            if(document.getElementById('torTree').style.display=='block'){
                $('#torTree').fadeOut(300);
            } else {
                $('#torTree').fadeIn(300);
            }
        }
    }

    function isMenu3(){
        if(document.getElementById('search-box').style.display=='block'){
            $('#search-box').fadeOut(300);
        } else {
            $('#search-box').fadeIn(300);
        }
    }

    function isComments(){
        if(document.getElementById('btn-comments').innerText=='show comments'){
            document.getElementById('btn-comments').innerText='hide comments';
            document.getElementById('comments').style.display='block';
            site_comment_load();
        } else {
            document.getElementById('btn-comments').innerText='show comments';
            document.getElementById('comments').style.display='none';
        }
    }

    function Search404(){
        $('#menu-1').fadeIn(150);
        $('#menu-2').fadeIn(150);
        $('#menu-3').fadeIn(150);
        $('#search-box').fadeIn(300);
    }

    function goBack(){
        window.history.back();
    }
</script>


<script async>
"use strict";
(function(){
var cp = function(){
    var len = cPlayerOptions.length;
    for(var i=0;i<len;i++){
        var element = document.getElementById('player' + cPlayerOptions[i]['id'])
        while (element.hasChildNodes()) {
            element.removeChild(element.firstChild);
        };
        cPlayers[i] = new cPlayer({
            element: element,
            list: cPlayerOptions[i]['list'],
            });
    };
    cPlayers = [];cPlayerOptions = [];
};
var script = document.createElement('script');
script.type = "text/javascript";
script.src = "https://cdn.bootcss.com/cplayer/3.2.1/cplayer.js";
script.async = true;
if(script.readyState){  
    script.onreadystatechange = function(){
        if (script.readyState == "loaded" ||
            script.readyState == "complete"){
            script.onreadystatechange = null;
            cp();
        }
    };
}else{  
    script.onload = function(){
        cp();
    };
}
document.head.appendChild(script);
})();
</script>

    </body>
</html>
